package com.eim.user.controller;

import com.eim.user.utils.TokenUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @GetMapping("index.do")
    public String index(){
        return "hello";
    }

    @PostMapping("login.do")
    public String Login(String userName,String passWord){
        String token = TokenUtil.getToken(userName, passWord);
        return token;
    }
}
